package com.lunchEveryDay.dao;

import com.lunchEveryDay.entity.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Admin on 2015/7/21.
 */
@Repository
public class UserDao extends BaseDao<User,String>{

	public User getUser(String username){
		User user = (User)getCurrentSession().createQuery(
				  "from User as u where u.username = ?")
				  .setString(0, username)
				  .uniqueResult();
		return user;
	}
}
